package com.gsoe.problem.client;


import com.gsoe.base.model.MqMessage;
import com.gsoe.base.model.Result;
import com.gsoe.problem.dto.JudgeExamDTO;
import com.gsoe.problem.po.Judge;
import com.gsoe.problem.vo.ProblemNumberVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(value = "judge-api")
public interface JudgeClient {
    @GetMapping("/judge/testCache/getTestCache/{testId}")
    public Result<Map<Long,String>> getTestCache(@PathVariable("testId") Long testId);

    @GetMapping("/judge/examCache/getExamCache/{examId}/{userId}")
    public Result<Map<Long,String>> getExamCache(@PathVariable("examId") Long examId, @PathVariable("userId") Long userId);

    @PostMapping("/judge/examCache/getExamCacheByUserList")
    public Result<Map<Long,Map<Long,String>>> getExamCacheByUserList(@RequestBody MqMessage mqMessage);

    @DeleteMapping("/judge/testCache/delByTextId/{id}")
    public Result<String> delByTextId(@PathVariable("id") Long id);

    @DeleteMapping("/judge/examCache/delByTextId/{id}")
    public Result<String> delByExamId(@PathVariable("id") Long id);

    @GetMapping("/judge/getProblemNumberByDiff/{userId}")
    public Result<List<Judge>>  getProblemNumberByDiff(@PathVariable(value="userId") Long userId);
}
